﻿using System;

using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace Silvermoon.OpenGL.Native.Vectors
{
    [StructLayout(LayoutKind.Sequential)]
    public struct VCVector2s
    {
        public short X;
        public short Y;
        public int ColorValue;

        public GlColor Color
        {
            get { return ColorValue; }
            set { ColorValue = value.Value; }
        }

        public VCVector2s(short x, short y, GlColor color)
        {
            this.X = x;
            this.Y = y;
            this.ColorValue = color.Value;
        }

        public VCVector2s(short x, short y, int colorValue)
        {
            this.X = x;
            this.Y = y;
            this.ColorValue = colorValue;
        }


        public void SetValues(int x, int y, GlColor color)
        {
            this.X = (short)x;
            this.Y = (short)y;
            this.ColorValue = color.Value;
        }
    }

    [StructLayout(LayoutKind.Sequential)]
    public struct VCVector2i
    {
        public int X;
        public int Y;
        public int ColorValue;

        public GlColor Color
        {
            get { return ColorValue; }
            set { ColorValue = value.Value; }
        }

        public VCVector2i(int x, int y, GlColor color)
        {
            this.X = x;
            this.Y = y;
            this.ColorValue = color.Value;
        }

        public VCVector2i(int x, int y, int colorValue)
        {
            this.X = x;
            this.Y = y;
            this.ColorValue = colorValue;
        }

    }
}
